home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 3426 < prev    next >
Encoding:
Text File  |  1996-08-05  |  1.1 KB  |  44 lines

  1. Path: mail2news.demon.co.uk!genesis.demon.co.uk
  2. From: Lawrence Kirby <fred@genesis.demon.co.uk>
  3. Newsgroups: comp.lang.c
  4. Subject: Re: strings
  5. Date: Sun, 28 Jan 96 20:19:55 GMT
  6. Organization: none
  7. Message-ID: <822860395snz@genesis.demon.co.uk>
  8. References: <4eg9qj$1ut4@sp115.ocs.lsu.edu> <4egglq$d3g@fountain.mindlink.net>
  9. Reply-To: fred@genesis.demon.co.uk
  10. X-NNTP-Posting-Host: genesis.demon.co.uk
  11. X-Newsreader: Demon Internet Simple News v1.27
  12. X-Mail2News-Path: genesis.demon.co.uk
  13.  
  14. In article <4egglq$d3g@fountain.mindlink.net>
  15.            genew@mindlink.bc.ca "Gene Wirchenko" writes:
  16.  
  17. >eenaya@unix1.sncc.lsu.edu (Pradeep Nayar) wrote:
  18. >
  19. >>Hi,
  20. >>I saw this piece of code in a book somewhere.  
  21. >
  22. >>----
  23. >>char *str ;
  24. >
  25. >>str = "hello world"[10] ;
  26. ...
  27. >     In plain language:
  28. >
  29. >          char str;
  30. >          str='d';
  31.  
  32. More precisely:
  33.  
  34.            char *str;
  35.            str='d';
  36.  
  37. which involves an illegal conversion hence the compiler must diagnose it.
  38.  
  39. -- 
  40. -----------------------------------------
  41. Lawrence Kirby | fred@genesis.demon.co.uk
  42. Wilts, England | 70734.126@compuserve.com
  43. -----------------------------------------
  44.